home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / text / html / TextAreaDocument.class (.txt) < prev   
Encoding:
Java Class File  |  1999-07-15  |  766 b   |  30 lines

  1. package javax.swing.text.html;
  2.  
  3. import javax.swing.text.AbstractDocument;
  4. import javax.swing.text.AttributeSet;
  5. import javax.swing.text.BadLocationException;
  6. import javax.swing.text.PlainDocument;
  7.  
  8. class TextAreaDocument extends PlainDocument {
  9.    String initialText;
  10.  
  11.    void reset() {
  12.       try {
  13.          ((AbstractDocument)this).remove(0, ((AbstractDocument)this).getLength());
  14.          if (this.initialText != null) {
  15.             ((AbstractDocument)this).insertString(0, this.initialText, (AttributeSet)null);
  16.          }
  17.       } catch (BadLocationException var1) {
  18.       }
  19.  
  20.    }
  21.  
  22.    void storeInitialText() {
  23.       try {
  24.          this.initialText = ((AbstractDocument)this).getText(0, ((AbstractDocument)this).getLength());
  25.       } catch (BadLocationException var1) {
  26.       }
  27.  
  28.    }
  29. }
  30.